<?php

class Backend_Form_Role extends Zend_Form
{

    public function init() {
        parent::init();
        
        $this->setMethod('post');
        $this->setName('add_role');
        $this->setAction('/backend/acl/addrole');
        
        $id = new Zend_Form_Element_Hidden('id');

        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('Name:')
                ->setAttrib('placeholder', 'name')
                ->setRequired(true)
                ->addValidator('StringLength', false, array(4, 255));
      
        
        $submit = new Zend_Form_Element_Submit('submit');  
        $submit->setLabel('Save')
                ->setAttribs(array('class'=>'btn btn-primary'))
                ;  
      
        $this->addElement($id)
                ->addElement($name)
                ->addElement($submit)
                ;  
    }
    
}
